<template>
  <div class="app-container">
    <el-form :model="queryParams" ref="queryForm" :inline="true" v-show="showSearch" label-width="68px">
      <el-form-item label="搜索" prop="userid">
        <el-input v-model="queryParams.userid" placeholder="请输入关键字" clearable size="small" @keyup.enter.native="handleQuery" />
      </el-form-item>
      <el-form-item label="项目名称" prop="nid">
        <el-input v-model="queryParams.nid" placeholder="请输入项目名称" clearable size="small" @keyup.enter.native="handleQuery" />
      </el-form-item>
      <el-form-item label="状态" prop="wid">
        <el-input v-model="queryParams.wid" placeholder="请输入工作流节点" clearable size="small" @keyup.enter.native="handleQuery" />
      </el-form-item>
      <el-form-item>
        <el-button type="primary"  size="mini" @click="handleQuery">搜索</el-button>
        <el-button size="mini" @click="resetQuery">重置</el-button>
      </el-form-item>
    </el-form>

    <el-row :gutter="20" class="mb8">
      <el-col :span="1.5">
        <el-button type="primary" plain icon="el-icon-plus" size="mini" @click="handleAdd" v-hasPermi="['standard:standd:add']">新增</el-button>
      </el-col>
      <el-col :span="1.5">
        <el-button type="primary" plain icon="el-icon-edit" size="mini" :disabled="single" @click="handleUpdate"
          v-hasPermi="['standard:standd:edit']">修改</el-button>
      </el-col>
      <el-col :span="1.5">
        <el-button type="primary" plain icon="el-icon-delete" size="mini" :disabled="multiple" @click="handleDelete"
          v-hasPermi="['standard:standd:remove']">删除</el-button>
      </el-col>
      <el-col :span="1.5">
        <el-button type="primary" plain icon="el-icon-download" size="mini" @click="handleExport" v-hasPermi="['standard:standd:export']">导出</el-button>
      </el-col>
      <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
    </el-row>

    <el-table v-loading="loading" :data="standdList" @selection-change="handleSelectionChange">
      <el-table-column type="selection" width="55" align="left" />
      <el-table-column label="项目名称" align="left" prop="projectName" />
      <el-table-column label="编制人" align="left" prop="userName" />
      <el-table-column label="标准规范征求意见稿" align="left" prop="rfp" />
      <el-table-column label="当前办理人" align="left" prop="status" />
      <el-table-column label="开始时间" align="left" prop="dt" />
      <el-table-column label="状态" align="left" prop="status" />
      <el-table-column label="操作" align="left" class-name="small-padding fixed-width">
        <template slot-scope="scope">
          <el-button size="mini" type="text" icon="el-icon-edit-outline" @click="handleTransact(scope.row)" v-hasPermi="['standard:notice:transact']">办理</el-button>
          <el-button size="mini" type="text" icon="el-icon-edit" @click="handleUpdate(scope.row)" v-hasPermi="['standard:standd:edit']">修改</el-button>
          <el-button size="mini" type="text" icon="el-icon-delete" @click="handleDelete(scope.row)" v-hasPermi="['standard:standd:remove']">删除</el-button>
        </template>
      </el-table-column>
    </el-table>

    <pagination v-show="total>0" :total="total" :page.sync="queryParams.pageNum" :limit.sync="queryParams.pageSize"
      @pagination="getList" />

    <!-- 添加或修改标准规范起草对话框 -->

    <el-dialog :title="title" :visible.sync="open" width="1080px" append-to-body>
      <el-card class="box-card">

        <div slot="header" class="clearfix">
          <span style="font-size: 16px;font-weight: 600;">项目基础信息</span>
        </div>

        <el-form ref="prjForm" :model="prjForm" :rules="rules" label-width="120px">

          <el-row>

            <el-col :span="12">
              <el-form-item label="项目名称" prop="projectName">
                <el-select style="width: 380px;" v-model="prjForm.projectName" placeholder="" @change="handleSelectPrj" :disabled="prjSelect" >
                  <el-option v-for="prj in projectList" :key="prj.nid" :label="prj.projectName" :value="prj.nid" />
                </el-select>
              </el-form-item>
            </el-col>

            <el-col :span="12" v-if=" hasPrjInfo ">
              <el-form-item label="关键词" prop="keyword">
                <el-input v-model="prjForm.keyword" placeholder="" readonly />
              </el-form-item>
            </el-col>
          </el-row>

          <el-row v-if=" hasPrjInfo ">

            <el-col :span="12">
              <el-form-item label="专业门类选择" prop="majorValue">
                <el-cascader style="width: 380px;" v-model='majorValue' :options="majorOptions" placeholder="" disabled></el-cascader>
              </el-form-item>
            </el-col>

            <el-col :span="12">
              <el-form-item label="功能序列选择" prop="functionValue">
                <el-cascader style="width: 380px;" v-model='functionValue' :options="functionOptions" placeholder=""
                  disabled></el-cascader>
              </el-form-item>
            </el-col>

            <el-col :span="12">
              <el-form-item label="标准性质" prop="standardNature">
                <el-select style="width: 380px;" v-model="prjForm.standardNature" placeholder="" disabled>
                  <el-option v-for="dict in typeStandardNatureOptions" :key="dict.dictValue" :label="dict.dictLabel"
                    :value="dict.dictValue" />
                </el-select>
              </el-form-item>
            </el-col>

            <el-col :span="12">
              <el-form-item label="标准状态" prop="standardStatus">
                <el-select style="width: 380px;" v-model="prjForm.standardStatus" placeholder="" disabled>
                  <el-option v-for="dict in typeStandardStatusOptions" :key="dict.dictValue" :label="dict.dictLabel"
                    :value="dict.dictValue" />
                </el-select>
              </el-form-item>
            </el-col>

            <el-col :span="12">
              <el-form-item label="项目负责人" prop="pi">
                <el-input v-model="prjForm.pi" placeholder="" readonly />
              </el-form-item>
            </el-col>
            <el-col :span="12">
              <el-form-item label="职务" prop="post">
                <el-input v-model="prjForm.post" placeholder="" readonly />
              </el-form-item>
            </el-col>
            <el-col :span="12">
              <el-form-item label="电话" prop="tel">
                <el-input v-model="prjForm.tel" placeholder="" readonly />
              </el-form-item>
            </el-col>
            <el-col :span="12">
              <el-form-item label="电子邮件" prop="email">
                <el-input v-model="prjForm.email" placeholder="" readonly />
              </el-form-item>
            </el-col>
            <el-col :span="12">
              <el-form-item label="制定或修订" prop="tp">
                <el-radio-group v-model="prjForm.tp" size="small" disabled>
                  <el-radio-button label="制定"></el-radio-button>
                  <el-radio-button label="修订"></el-radio-button>
                </el-radio-group>
              </el-form-item>
            </el-col>
          </el-row>
        </el-form>
      </el-card>

      <el-card class="box-card" style="margin-top: 20px;">
        <div slot="header" class="clearfix">
          <span style="font-size: 16px;font-weight: 600;">标准规范起草阶段信息</span>
        </div>
        <el-form ref="form" :model="form" :rules="rules" label-width="120px">
          <el-col :span="12">
            <!--
            :action="upload.url"
            :data="prjForm"  没吊用

            //添加:http-request后不起作用
            :on-progress="handleFileUploadProgress"
            :on-success="handleFileSuccess"
            -->
            <el-form-item label="征求意见稿" prop="files">
              <el-upload
                ref="upload"
                accept=".pdf,.doc,.docx,.jpg,.jpeg,.png"
                :headers="upload.headers"
                action="#"
                :disabled="upload.isUploading"
                :on-change="handleCheckFile"
                :on-preview="handleViewFile"
                :on-remove="handleRemoveFile"
                :http-request="requestUpload"
                :before-upload="beforeUpload"
                :auto-upload="false"
                :file-list="fileList"
                drag >
                <i class="el-icon-upload"></i>
                <div class="el-upload__text">
                  将文件拖到此处，或
                  <em>点击上传</em>
                </div>
                <div class="el-upload__tip" style="color:red" slot="tip">提示：只能上传word/pdf文件，且不超过20M！</div>
              </el-upload>
            </el-form-item>
          </el-col>
        </el-form>
      </el-card>

      <el-card class="box-card" style="margin-top: 20px;" v-if="optPage||viewOpt">
        <div slot="header" class="clearfix">
          <span style="font-size: 16px;font-weight: 600;">部门办理意见</span>
        </div>
        <el-form label-width="120px">
          <el-row v-for="opn in opinionList" :key="index" >
            <el-col :span="24">
              <el-form-item :label="opn.node">
                <el-input placeholder="" type="textarea" :value="opn.opn" readonly></el-input>
                <div style="position: absolute;right:20px;margin-top: -30px;">
                  <span>{{opn.name}}</span>
                  <span style="margin-left: 20px;">{{opn.st}}</span>
                </div>
              </el-form-item>
            </el-col>
          </el-row>
        </el-form>
      </el-card>

      <div slot="footer" class="dialog-footer">
        <!-- 开始办理 @click="submitForm" -->
        <!-- <el-button @click="handleFlowTo" v-if="!optPage">提交部门审核</el-button> -->
        <el-button @click="cancel">取 消</el-button>
        <el-button type="primary" @click="submitFileForm" v-if="!optPage">保 存</el-button>
        <el-button type="primary" @click="handleOpinion" v-if="optPage">开始办理</el-button>
      </div>

      <!-- 开始办理对话框 -->
      <el-dialog title="开始办理" :visible.sync="openOpt" width="600px" append-to-body>

        <el-form ref="formOpt" :model="formOpt" :rules="rules" label-width="90px">
          <el-row>
            <el-col :span="16">
              <el-form-item label="办理人意见" prop="opinion">
                <el-input v-model="myOpinion" type="textarea" rows="5" placeholder=""></el-input>
              </el-form-item>
            </el-col>
            <el-col :span="8" class="word_hui">
              <el-button size="small" style="margin-top: 3px;margin-left: 10px;" @click="inputOpinion">同意。</el-button>
              <el-button size="small" style="margin-top: 3px;" @click="inputOpinion">已阅。</el-button>
              <el-button size="small" style="margin-top: 3px;" @click="inputOpinion">退回。</el-button>
              <el-button size="small" style="margin-top: 3px;" @click="inputOpinion">抓紧办理。</el-button>
              <el-button size="small" style="margin-top: 3px;" @click="inputOpinion">重新修改。</el-button>
            </el-col>
          </el-row>
          <el-row>
            <el-col :span="24">
              <el-form-item label="流程提交至" prop="opinion">
                <el-select v-model="value" placeholder="请选择">
                  <el-option v-for="item in options" :key="item.value" :label="item.label" :value="item.value">
                  </el-option>
                </el-select>
              </el-form-item>
            </el-col>
          </el-row>
          <el-row>
            <el-col :span="24">
              <el-form-item label="经办人" prop="opinion">
                <el-input value="张三" style="width: 12.5rem;" readonly />
              </el-form-item>
            </el-col>
          </el-row>
        </el-form>

        <div slot="footer" class="dialog-footer">
          <el-button @click="openOpt = false">返 回</el-button>
          <el-button type="primary" @click="openOpt = false;open = false;">办理完成</el-button>
        </div>
      </el-dialog>

    </el-dialog>
  </div>
</template>

<script>
  import {
    listStandd,
    getStandd,
    delStandd,
    addStandd,
    updateStandd,
    exportStandd,
    addUploadFile,
    updateUploadFile,
    getUploadFiles
  } from "@/api/standard/standd"

  import {
    getNotice,
    selectPrjOptions
  } from '@/api/standard/notice'

  import {
    optionSelect
  } from "@/api/system/dict/data"

  import {
    getToken
  } from "@/utils/auth";

  export default {
    name: "Standd",
    data() {
      return {
        // 遮罩层
        loading: true,
        // 选中数组
        ids: [],
        // 非单个禁用
        single: true,
        // 非多个禁用
        multiple: true,
        // 显示搜索条件
        showSearch: true,
        // 总条数
        total: 0,
        // 标准规范起草表格数据
        standdList: [],
        // 弹出层标题
        title: "",
        // 是否显示弹出层
        open: false,
        // 查询参数
        queryParams: {
          pageNum: 1,
          pageSize: 10,
          userid: null,
          nid: null,
          wid: null,
          rfp: null,
          wStatus: null
        },
        // 判断新增、或者修改
        sid: null,

        //专业门类选择
        majorValue: [],
        majorOptions: [],
        //功能序列选择
        functionValue: [],
        functionOptions: [],
        // 类型数据字典
        typeOptions: [],
        typeStandardNatureOptions: [],
        typeStandardStatusOptions: [],
        typeStandardLevelOptions: [],
        typeStandardUnitOptions: [],
        // fileList: [{
        //   name: '标准规范征求意见稿3.0',
        //   url: 'https://fuss10.elemecdn.com/3/63/4e7f3a15429bfda99bce42a18cdd1jpeg.jpeg?imageMogr2/thumbnail/360x360/format/webp/quality/100'
        // }, {
        //   name: '标准规范征求意见稿2.0',
        //   url: 'https://fuss10.elemecdn.com/3/63/4e7f3a15429bfda99bce42a18cdd1jpeg.jpeg?imageMogr2/thumbnail/360x360/format/webp/quality/100'
        // }],

        //项目基本信息部门
        projectList: [],
        prjForm: {},
        hasPrjInfo: false,

        // 办理表单参数
        formOpt: {},
        openOpt: false,
        optPage: false,
        viewOpt: false,
        myOpinion: '',
        opinionList: [],
        options: [],
        value: '',
        // 上传多附件时,只执行一次
        fileIndex: 0,
        // 用作页面展示的上传文件list
        fileList: [],
        // 用作上传到后台的file参数
        uploadfileList: [],
        // 控制项目下拉是否可选
        prjSelect: false,
        // 记录附件是否发生变化
        fileChange: false,

        upload: {
          // 是否禁用上传
          isUploading: false,
          updateSupport: 0,
          // 设置上传的请求头部
          headers: {
            Authorization: "Bearer " + getToken()
          },
          // 上传的地址
          url: process.env.VUE_APP_BASE_API + "/standard/standd/attachment?nid=123"
        },

        // 表单参数
        form: {},
        // 表单校验
        rules: {
          xxxx: [{
            required: true,
            message: "用户id不能为空",
            trigger: "blur"
          }],

        }
      };
    },

    created() {
      this.getList();

      //立项通知流程状态
      this.getDicts('standard_notice_type').then(response => {
        this.typeOptions = response.data
      });
      //标准性质
      this.getDicts('standard_nature_type').then(response => {
        this.typeStandardNatureOptions = response.data
      });
      //标准状态
      this.getDicts('standard_status_type').then(response => {
        this.typeStandardStatusOptions = response.data
      });
      //专业门类选择
      optionSelect("standard_major_type").then(response => {
        this.majorOptions = this.cascaderNormalizer(response.data)
      });
      //功能序列选择
      optionSelect("standard_function_type").then(response => {
        this.functionOptions = this.cascaderNormalizer(response.data)
      });

      //当前用户部门的已经立项的项目列表w_status=3,且自己是经办人
      selectPrjOptions().then(response => {
        this.projectList = response.data
      });
    },

    methods: {
      /** 查询标准规范起草列表 */
      getList() {
        this.loading = true;
        listStandd(this.queryParams).then(response => {
          this.standdList = response.rows;
          this.total = response.total;
          this.loading = false;
        });
      },
      // 取消按钮
      cancel() {
        this.open = false;
        this.reset();
      },
      // 表单重置
      reset() {
        this.form = {
          sid: null,
          userid: null,
          nid: null,
          wid: null,
          rfp: null
        };
        this.resetForm("form");
      },

      resetPrj() {
        this.hasPrjInfo = false
        this.majorValue = null
        this.functionValue = null

        this.prjForm = {
          projectName: null,
          keyword: null,
          standardNature: null,
          standardStatus: null,
          pi: null,
          post: null,
          tel: null,
          email: null,
          tp: null,
          nid: null
        };
        this.resetForm("prjForm");
      },

      /** 搜索按钮操作 */
      handleQuery() {
        this.queryParams.pageNum = 1;
        this.getList();
      },
      /** 重置按钮操作 */
      resetQuery() {
        this.resetForm("queryForm");
        this.handleQuery();
      },

      hideUpload() {
        //办理页面要隐藏上传按钮
        var obj = document.getElementsByClassName("el-upload-dragger");
        var obj_tip = document.getElementsByClassName("el-upload__tip");
        var obj_text = document.getElementsByClassName("el-upload--text");
        if (obj) {
          obj[0].style.display = "none";
          obj_tip[0].style.display = "none";
          obj_text[0].style.display = "none";
        }
      },
      showUpload() {
        //新增和编辑页面要显示上传按钮
        var obj = document.getElementsByClassName("el-upload-dragger");
        var obj_tip = document.getElementsByClassName("el-upload__tip");
        var obj_text = document.getElementsByClassName("el-upload--text");
        if (obj) {
          obj[0].style.display = "";
          obj_tip[0].style.display = "";
          obj_text[0].style.display = "";
        }
      },

      // 开始办理
      handleOpinion() {
        this.openOpt = true;
        // console.log(document.getElementsByClassName("el-upload-dragger"));
      },
      inputOpinion(value) {
        this.myOpinion += value.srcElement.innerText;
      },
      // 办理按钮操作
      handleTransact(row) {
        //避免切换（住建/市监）时报错
        this.reset()
        // 重置开始办理表单（写在这里方便记录未完成的意见）
        // this.formOpt
        this.myOpinion = "";
        const sid = row.sid || this.ids
        getStandd(sid).then(response => {
          this.functionValue = response.data.functionValue == null ? [] : response.data.functionValue.split(",").map(
            Number);
          this.majorValue = response.data.majorValue == null ? [] : response.data.majorValue.split(",").map(Number);
          this.form = response.data
          this.open = true
          //办理页面
          this.optPage = true
          this.title = '办理标准规范起草'
        })
      },
      /** 提交部门审核 */
      handleFlowTo() {
        const nids = this.ids
        this.$confirm('确认立项通知信息无误并提交部门负责人审核?', '提示', {
          confirmButtonText: '确定',
          cancelButtonText: '取消',
          type: 'warning'
        }).then(function() {
          // return delNotice(nids)
        }).then(() => {
          this.getList()
          this.msgSuccess('提交成功')
          this.open = false
        })
      },

      // 多选框选中数据
      handleSelectionChange(selection) {
        this.ids = selection.map(item => item.sid)
        this.single = selection.length !== 1
        this.multiple = !selection.length
      },
      /** 新增按钮操作 */
      handleAdd() {
        //this.reset();
        this.resetPrj()
        this.open = true;
        this.sid = null
        this.prjSelect = true
        // 清空附件列表
        this.fileList = []
        this.uploadfileList = []
        // 记录附件是否发生变更
        this.fileChange = false
        // 是否正在上传
        this.upload.isUploading = false
        // 文件游标
        this.fileIndex = 0
        this.title = "添加标准规范起草";
      },
      /** 修改按钮操作 */
      handleUpdate(row) {
        this.reset();
        const sid = row.sid || this.ids
        this.sid = sid
        // 项目编码
        const nid = row.nid

        this.handleSelectPrj(nid);
        // 是否办理页面
        this.optPage = false
        // 下拉框控制不能修改
        this.prjSelect = true
        // 清空附件列表
        this.fileList = []
        this.uploadfileList = []
        // 记录附件是否发生变更
        this.fileChange = false
        // 是否正在上传
        this.upload.isUploading = false
        // 文件游标
        this.fileIndex = 0

        // 加载附件
        getUploadFiles(sid).then(response => {
          for(var i=0;i<response.data.length;i++){
            var img = {}
            img.name = response.data[i].fname
            img.url = process.env.VUE_APP_BASE_API + response.data[i].filename
            this.fileList.push(img)
          }
        });
      },
      /** 提交按钮 */
      submitForm() {
        this.$refs["form"].validate(valid => {
          if (valid) {
            if (this.form.sid != null) {
              updateStandd(this.form).then(response => {
                this.msgSuccess("修改成功");
                this.open = false;
                this.getList();
              });
            } else {
              addStandd(this.form).then(response => {
                this.msgSuccess("新增成功");
                this.open = false;
                this.getList();
              });
            }
          }
        });
      },
      /** 删除按钮操作 */
      handleDelete(row) {
        const sids = row.sid || this.ids;
        this.$confirm('是否确认删除标准规范起草编号为"' + sids + '"的数据项?', "警告", {
          confirmButtonText: "确定",
          cancelButtonText: "取消",
          type: "warning"
        }).then(function() {
          return delStandd(sids);
        }).then(() => {
          this.getList();
          this.msgSuccess("删除成功");
        })
      },
      /** 导出按钮操作 */
      handleExport() {
        const queryParams = this.queryParams;
        this.$confirm('是否确认导出所有标准规范起草数据项?', "警告", {
          confirmButtonText: "确定",
          cancelButtonText: "取消",
          type: "warning"
        }).then(function() {
          return exportStandd(queryParams);
        }).then(response => {
          this.download(response.msg);
        })
      },
      handleSelectPrj(value) {
        this.hasPrjInfo = true
        // 根据选择的nid查询详情
        getNotice(value).then(response => {
          this.functionValue = response.data.functionValue == null ? [] : response.data.functionValue.split(",").map(
            Number);
          this.majorValue = response.data.majorValue == null ? [] : response.data.majorValue.split(",").map(Number);
          this.selfEvlaOpt = response.data.selfEvla == null ? [] : response.data.selfEvla.split(",").map(String);
          this.prjForm = response.data

          this.open = true
        })
      },

      // 上传预处理
      beforeUpload(file) {
        console.log("beforeUpload...")
        const fileSuffix = file.name.substring(file.name.lastIndexOf(".") + 1);
        const whiteList = ["pdf", "doc", "docx", "jpg", "png", "jpeg"];
        if (whiteList.indexOf(fileSuffix) === -1) {
          this.msgError("上传文件只能是 pdf、doc、docx、jpg、png格式", "error");
          return false;
        }
        const isLt20M = (file.size / 1024 / 1024) * 10 < 20;
        if (!isLt20M) {
          this.msgError("上传文件大小不能超过 20MB", "error");
          return false;
        }
      },

      /** 下载模板操作 */
      // importTemplate() {
      //   importTemplate().then(response => {
      //     this.download(response.msg);
      //   });
      // },

      // 覆盖默认的上传行为（每个附件都会执行一次）
      requestUpload(value) {
        console.log("start upload...")
        let formData = new FormData();
        // 将附件循环赋值给后台参数uploadfileList[]
        this.uploadfileList[this.fileIndex++] = value.file
        // 要把两个附件整合到一块上传
        // console.log(this.fileList.length)
        if(this.fileIndex==this.fileList.length){
          for(var i=0;i<this.uploadfileList.length;i++){
            formData.append("files", this.uploadfileList[i]);
          }
          formData.append("nid", this.prjForm.nid);//项目ID
          if (this.sid != null) {
            formData.append("sid", this.sid);//起草id

            console.log("update:"+formData)

            // updateUploadFile(formData).then(response => {
            //   this.$refs.upload.clearFiles();
            //   this.msgSuccess("提交成功");
            //   this.getList()
            //   this.fileList = []
            //   this.open = false
            // });
          } else {
            console.log("add:"+formData)
            // addUploadFile(formData).then(response => {
            //   this.$refs.upload.clearFiles();
            //   this.msgSuccess("提交成功");
            //   this.getList()
            //   this.fileList = []
            //   this.open = false
            // });
          }
        }
      },
      // 选中文件，list+1
      handleCheckFile(file, fileList) {
        this.fileList = fileList
        this.fileChange = true
      },
      // 查看附件
      handleViewFile(file, fileList){
        window.open(file.url)
      },
      // 删除附件
      handleRemoveFile(file, fileList){

        this.fileList = fileList
        this.fileChange = true
        console.log(this.fileList)
        console.log(file)
      },
      // 文件上传中处理(添加requestUpload不起作用)
      handleFileUploadProgress(event, file, fileList) {
        console.log("handleFileUploadProgress")
        this.upload.isUploading = true;
      },
      // 文件上传成功处理(添加requestUpload不起作用)
      handleFileSuccess(response, file, fileList) {
        console.log("handleFileSuccess")
        this.upload.isUploading = false;
        this.$refs.upload.clearFiles();
        this.$alert(response.msg, "提交结果", {
          dangerouslyUseHTMLString: true
        });
        //this.getList();
      },
      // 提交上传文件
      submitFileForm() {
        console.log("submit...")
        if (this.prjForm == null || this.prjForm.nid == null) {
          this.msgError("请选择一个项目！");
          return;
        }
        if (this.fileList.length <= 0) {
          this.msgError("请至少上传一个文件！");
          return;
        }

        if(this.fileChange){// 附件发生变化
          // this.$refs.upload.submit();//调用requestUpload方法
        }else{
          console.log("456")
          this.msgSuccess("未发生变更");
          this.open = false
        }


      }
    }
  };
</script>
